
extends Node2D

var effect
@export var done = false

func _ready():
	effect = get_node("AnimationPlayer")

func _physics_process(delta):
	if (done):
		get_node("Timer").start()
		done = false

func play():
	var num = (randi() % 2) + 1
	var text = "effect" + str(num)
	effect.play(text)


func _on_Timer_timeout():
	queue_free()
